function get_sign(t) {
	return crawler({
		"X-MS-STUB": t
	})["X-Bogus"]
}
const decodeCommentTypeTag = {
	0: "COMMENTTYPETAGUNKNOWN",
	1: "COMMENTTYPETAGSTAR"
};
function decodeResponse(t) {
	return _decodeResponse(wrapByteBuffer(t))
}
function decodeChat(Ve) {
	var Et, Pt, qe, Ue, Lt, At;
		let kt = decodeChatMessage(Ve);
		if (!kt || !kt.content)
			return;
		const tr = {
			nickname: kt.user.nickName,
			gender: kt.user.gender === 1 ? "男" : "女",
			signature: kt.user.Signature,
			telephone: kt.user.Telephone,
			city: kt.user.city,
			sec_uid: kt.user.secUid,
			level: (Pt = (Et = kt.user.PayGrade) == null ? void 0 : Et.level) == null ? void 0 : Pt.low,
			age_range: kt.user.ageRange,
			following_count: (Ue = (qe = kt.user.FollowInfo) == null ? void 0 : qe.followingCount) == null ? void 0 : Ue.low,
			follower_count: (At = (Lt = kt.user.FollowInfo) == null ? void 0 : Lt.followerCount) == null ? void 0 : At.low,
			action_type: "评论",
			content: kt.content
		};
		return tr;
}
function decodeGift(Ve) {
		let ze = decodeGiftMessage(Ve)
		  , Et = "用户名：" + ze.user.nickName + "		礼物：" + ze.gift.name;
		
		let Pt = {
			nickname: ze.user.nickName,
			gender: ze.user.gender == 1 ? "男" : "女",
			signature: ze.user.Signature,
			telephone: ze.user.Telephone,
			city: ze.user.city,
			sec_uid: ze.user.secUid,
			level: ze.user.PayGrade && ze.user.PayGrade.level && ze.user.PayGrade.level.low,
			age_range: ze.user.ageRange,
			following_count: ze.user.FollowInfo.followingCount && ze.user.FollowInfo.followingCount.low,
			follower_count: ze.user.FollowInfo.followerCount && ze.user.FollowInfo.followerCount.low,
			action_type: "礼物",
			content: ze.gift.name
		};
		return Pt;
}
function decodeLike(Ve) {
		let ze = decodeLikeMessage(Ve)
		  , Et = "用户名：" + ze.user.nickName + "		给主播点赞了x" + ze.count.low;
		let Pt = {
			nickname: ze.user.nickName,
			gender: ze.user.gender == 1 ? "男" : "女",
			signature: ze.user.Signature,
			telephone: ze.user.Telephone,
			city: ze.user.city,
			sec_uid: ze.user.secUid,
			level: ze.user.PayGrade && ze.user.PayGrade.level && ze.user.PayGrade.level.low,
			age_range: ze.user.ageRange,
			following_count: ze.user.FollowInfo.followingCount && ze.user.FollowInfo.followingCount.low,
			follower_count: ze.user.FollowInfo.followerCount && ze.user.FollowInfo.followerCount.low,
			action_type: "点赞",
			content: ze.count.low
		};
		return Pt;
}
function decodeFollow(Ve) {
		let ze = decodeSocialMessage(Ve)
		  , Et = "给主播点了关注";
	
		let Pt = {
			nickname: ze.user.nickName,
			gender: ze.user.gender == 1 ? "男" : "女",
			signature: ze.user.Signature,
			telephone: ze.user.Telephone,
			city: ze.user.city,
			sec_uid: ze.user.secUid,
			level: ze.user.PayGrade && ze.user.PayGrade.level && ze.user.PayGrade.level.low,
			age_range: ze.user.ageRange,
			following_count: ze.user.FollowInfo.followingCount && ze.user.FollowInfo.followingCount.low,
			follower_count: ze.user.FollowInfo.followerCount && ze.user.FollowInfo.followerCount.low,
			action_type: "关注",
			content: ""
		};
		return Pt
}
function decodeMember(Ve) {
		let ze = decodeMemberMessage(Ve)
		  , Et = "用户名：" + ze.user.nickName + "		进入了直播间";
		
		let Pt = {
			nickname: ze.user.nickName,
			gender: ze.user.gender == 1 ? "男" : "女",
			signature: ze.user.Signature,
			telephone: ze.user.Telephone,
			city: ze.user.city,
			sec_uid: ze.user.secUid,
			level: ze.user.PayGrade && ze.user.PayGrade.level && ze.user.PayGrade.level.low == null ? 0 : ze.user.PayGrade && ze.user.PayGrade.level && ze.user.PayGrade.level.low,
			age_range: ze.user.ageRange,
			following_count: ze.user.FollowInfo.followingCount && ze.user.FollowInfo.followingCount.low,
			follower_count: ze.user.FollowInfo.followerCount && ze.user.FollowInfo.followerCount.low,
			action_type: "进入",
			content: ""
		};
		return Pt
}
function decodeControl(Ve) {
	return decodeControlMessage(Ve)
}
function _decodeResponse(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				(r.messagesList || (r.messagesList = [])).push(_decodeMessage(t)),
				t.limit = g;
				break
			}
		case 2:
			{
				r.cursor = readString(t, readVarint32(t));
				break
			}
		case 3:
			{
				r.fetchInterval = readVarint64(t, !0);
				break
			}
		case 4:
			{
				r.now = readVarint64(t, !0);
				break
			}
		case 5:
			{
				r.internalExt = readString(t, readVarint32(t));
				break
			}
		case 6:
			{
				r.fetchType = readVarint32(t) >>> 0;
				break
			}
		case 7:
			{
				let g = r.routeParams || (r.routeParams = {}), y = pushTemporaryLength(t), $, L;
				t: for (; !isAtEnd(t); ) {
					let V = readVarint32(t);
					switch (V >>> 3) {
					case 0:
						break t;
					case 1:
						{
							$ = readString(t, readVarint32(t));
							break
						}
					case 2:
						{
							L = readString(t, readVarint32(t));
							break
						}
					default:
						skipUnknownField(t, V & 7)
					}
				}
				if ($ === void 0 || L === void 0)
					return console.log("Invalid data for map: routeParams");
				g[$] = L,
				t.limit = y;
				break
			}
		case 8:
			{
				r.heartbeatDuration = readVarint64(t, !0);
				break
			}
		case 9:
			{
				r.needAck = !!readByte(t);
				break
			}
		case 10:
			{
				r.pushServer = readString(t, readVarint32(t));
				break
			}
		case 11:
			{
				r.liveCursor = readString(t, readVarint32(t));
				break
			}
		case 12:
			{
				r.historyNoMore = !!readByte(t);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeMessage(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.method = readString(t, readVarint32(t));
				break
			}
		case 2:
			{
				r.payload = readBytes(t, readVarint32(t));
				break
			}
		case 3:
			{
				r.msgId = readVarint64(t, !1);
				break
			}
		case 4:
			{
				r.msgType = readVarint32(t);
				break
			}
		case 5:
			{
				r.offset = readVarint64(t, !1);
				break
			}
		case 6:
			{
				r.needWrdsStore = !!readByte(t);
				break
			}
		case 7:
			{
				r.wrdsVersion = readVarint64(t, !1);
				break
			}
		case 8:
			{
				r.wrdsSubKey = readString(t, readVarint32(t));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function decodeChatMessage(t) {
	return _decodeChatMessage(wrapByteBuffer(t))
}
function _decodeChatMessage(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.common = _decodeCommon(t),
				t.limit = g;
				break
			}
		case 2:
			{
				let g = pushTemporaryLength(t);
				r.user = _decodeUser(t),
				t.limit = g;
				break
			}
		case 3:
			{
				r.content = readString(t, readVarint32(t));
				break
			}
		case 4:
			{
				r.visibleToSender = !!readByte(t);
				break
			}
		case 5:
			{
				let g = pushTemporaryLength(t);
				r.backgroundImage = _decodeImage(t),
				t.limit = g;
				break
			}
		case 6:
			{
				r.fullScreenTextColor = readString(t, readVarint32(t));
				break
			}
		case 7:
			{
				let g = pushTemporaryLength(t);
				r.backgroundImageV2 = _decodeImage(t),
				t.limit = g;
				break
			}
		case 9:
			{
				let g = pushTemporaryLength(t);
				r.publicAreaCommon = _decodePublicAreaCommon(t),
				t.limit = g;
				break
			}
		case 10:
			{
				let g = pushTemporaryLength(t);
				r.giftImage = _decodeImage(t),
				t.limit = g;
				break
			}
		case 11:
			{
				r.agreeMsgId = readVarint64(t, !0);
				break
			}
		case 12:
			{
				r.priorityLevel = readVarint32(t) >>> 0;
				break
			}
		case 13:
			{
				let g = pushTemporaryLength(t);
				r.landscapeAreaCommon = _decodeLandscapeAreaCommon(t),
				t.limit = g;
				break
			}
		case 15:
			{
				r.eventTime = readVarint64(t, !0);
				break
			}
		case 16:
			{
				r.sendReview = !!readByte(t);
				break
			}
		case 17:
			{
				r.fromIntercom = !!readByte(t);
				break
			}
		case 18:
			{
				r.intercomHideUserCard = !!readByte(t);
				break
			}
		case 20:
			{
				r.chatBy = readString(t, readVarint32(t));
				break
			}
		case 21:
			{
				r.individualChatPriority = readVarint32(t) >>> 0;
				break
			}
		case 22:
			{
				let g = pushTemporaryLength(t);
				r.rtfContent = _decodeText(t),
				t.limit = g;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeLandscapeAreaCommon(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.showHead = !!readByte(t);
				break
			}
		case 2:
			{
				r.showNickname = !!readByte(t);
				break
			}
		case 3:
			{
				r.showFontColor = !!readByte(t);
				break
			}
		case 4:
			{
				(r.colorValueList || (r.colorValueList = [])).push(readString(t, readVarint32(t)));
				break
			}
		case 5:
			{
				let g = r.commentTypeTagsList || (r.commentTypeTagsList = []);
				if ((n & 7) === 2) {
					let y = pushTemporaryLength(t);
					for (; !isAtEnd(t); )
						g.push(decodeCommentTypeTag[readVarint32(t)]);
					t.limit = y
				} else
					g.push(decodeCommentTypeTag[readVarint32(t)]);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function decodeGiftMessage(t) {
	return _decodeGiftMessage(wrapByteBuffer(t))
}
function _decodeGiftMessage(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.common = _decodeCommon(t),
				t.limit = g;
				break
			}
		case 2:
			{
				r.giftId = readVarint64(t, !0);
				break
			}
		case 3:
			{
				r.fanTicketCount = readVarint64(t, !0);
				break
			}
		case 4:
			{
				r.groupCount = readVarint64(t, !0);
				break
			}
		case 5:
			{
				r.repeatCount = readVarint64(t, !0);
				break
			}
		case 6:
			{
				r.comboCount = readVarint64(t, !0);
				break
			}
		case 7:
			{
				let g = pushTemporaryLength(t);
				r.user = _decodeUser(t),
				t.limit = g;
				break
			}
		case 8:
			{
				let g = pushTemporaryLength(t);
				r.toUser = _decodeUser(t),
				t.limit = g;
				break
			}
		case 9:
			{
				r.repeatEnd = readVarint32(t) >>> 0;
				break
			}
		case 10:
			{
				let g = pushTemporaryLength(t);
				r.textEffect = _decodeTextEffect(t),
				t.limit = g;
				break
			}
		case 11:
			{
				r.groupId = readVarint64(t, !0);
				break
			}
		case 12:
			{
				r.incomeTaskgifts = readVarint64(t, !0);
				break
			}
		case 13:
			{
				r.roomFanTicketCount = readVarint64(t, !0);
				break
			}
		case 14:
			{
				let g = pushTemporaryLength(t);
				r.priority = _decodeGiftIMPriority(t),
				t.limit = g;
				break
			}
		case 15:
			{
				let g = pushTemporaryLength(t);
				r.gift = _decodeGiftStruct(t),
				t.limit = g;
				break
			}
		case 16:
			{
				r.logId = readString(t, readVarint32(t));
				break
			}
		case 17:
			{
				r.sendType = readVarint64(t, !0);
				break
			}
		case 18:
			{
				let g = pushTemporaryLength(t);
				r.publicAreaCommon = _decodePublicAreaCommon(t),
				t.limit = g;
				break
			}
		case 19:
			{
				let g = pushTemporaryLength(t);
				r.trayDisplayText = _decodeText(t),
				t.limit = g;
				break
			}
		case 20:
			{
				r.bannedDisplayEffects = readVarint64(t, !0);
				break
			}
		case 25:
			{
				r.displayForSelf = !!readByte(t);
				break
			}
		case 26:
			{
				r.interactGiftInfo = readString(t, readVarint32(t));
				break
			}
		case 27:
			{
				r.diyItemInfo = readString(t, readVarint32(t));
				break
			}
		case 28:
			{
				let g = r.minAssetSetList || (r.minAssetSetList = []);
				if ((n & 7) === 2) {
					let y = pushTemporaryLength(t);
					for (; !isAtEnd(t); )
						g.push(readVarint64(t, !0));
					t.limit = y
				} else
					g.push(readVarint64(t, !0));
				break
			}
		case 29:
			{
				r.totalCount = readVarint64(t, !0);
				break
			}
		case 30:
			{
				r.clientGiftSource = readVarint32(t) >>> 0;
				break
			}
		case 32:
			{
				let g = r.toUserIdsList || (r.toUserIdsList = []);
				if ((n & 7) === 2) {
					let y = pushTemporaryLength(t);
					for (; !isAtEnd(t); )
						g.push(readVarint64(t, !0));
					t.limit = y
				} else
					g.push(readVarint64(t, !0));
				break
			}
		case 33:
			{
				r.sendTime = readVarint64(t, !0);
				break
			}
		case 34:
			{
				r.forceDisplayEffects = readVarint64(t, !0);
				break
			}
		case 35:
			{
				r.traceId = readString(t, readVarint32(t));
				break
			}
		case 36:
			{
				r.effectDisplayTs = readVarint64(t, !0);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeGiftStruct(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.image = _decodeImage(t),
				t.limit = g;
				break
			}
		case 2:
			{
				r.describe = readString(t, readVarint32(t));
				break
			}
		case 3:
			{
				r.notify = !!readByte(t);
				break
			}
		case 4:
			{
				r.duration = readVarint64(t, !0);
				break
			}
		case 5:
			{
				r.id = readVarint64(t, !0);
				break
			}
		case 7:
			{
				r.forLinkmic = !!readByte(t);
				break
			}
		case 8:
			{
				r.doodle = !!readByte(t);
				break
			}
		case 9:
			{
				r.forFansclub = !!readByte(t);
				break
			}
		case 10:
			{
				r.combo = !!readByte(t);
				break
			}
		case 11:
			{
				r.type = readVarint32(t) >>> 0;
				break
			}
		case 12:
			{
				r.diamondCount = readVarint32(t) >>> 0;
				break
			}
		case 13:
			{
				r.isDisplayedOnPanel = !!readByte(t);
				break
			}
		case 14:
			{
				r.primaryEffectId = readVarint64(t, !0);
				break
			}
		case 15:
			{
				let g = pushTemporaryLength(t);
				r.giftLabelIcon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 16:
			{
				r.name = readString(t, readVarint32(t));
				break
			}
		case 17:
			{
				r.region = readString(t, readVarint32(t));
				break
			}
		case 18:
			{
				r.manual = readString(t, readVarint32(t));
				break
			}
		case 19:
			{
				r.forCustom = !!readByte(t);
				break
			}
		case 21:
			{
				let g = pushTemporaryLength(t);
				r.icon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 22:
			{
				r.actionType = readVarint32(t) >>> 0;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeGiftIMPriority(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = r.queueSizesList || (r.queueSizesList = []);
				if ((n & 7) === 2) {
					let y = pushTemporaryLength(t);
					for (; !isAtEnd(t); )
						g.push(readVarint64(t, !0));
					t.limit = y
				} else
					g.push(readVarint64(t, !0));
				break
			}
		case 2:
			{
				r.selfQueuePriority = readVarint64(t, !0);
				break
			}
		case 3:
			{
				r.priority = readVarint64(t, !0);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeTextEffect(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.portrait = _decodeTextEffectDetail(t),
				t.limit = g;
				break
			}
		case 2:
			{
				let g = pushTemporaryLength(t);
				r.landscape = _decodeTextEffectDetail(t),
				t.limit = g;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeTextEffectDetail(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.text = _decodeText(t),
				t.limit = g;
				break
			}
		case 2:
			{
				r.textFontSize = readVarint32(t) >>> 0;
				break
			}
		case 3:
			{
				let g = pushTemporaryLength(t);
				r.background = _decodeImage(t),
				t.limit = g;
				break
			}
		case 4:
			{
				r.start = readVarint32(t) >>> 0;
				break
			}
		case 5:
			{
				r.duration = readVarint32(t) >>> 0;
				break
			}
		case 6:
			{
				r.x = readVarint32(t) >>> 0;
				break
			}
		case 7:
			{
				r.y = readVarint32(t) >>> 0;
				break
			}
		case 8:
			{
				r.width = readVarint32(t) >>> 0;
				break
			}
		case 9:
			{
				r.height = readVarint32(t) >>> 0;
				break
			}
		case 10:
			{
				r.shadowDx = readVarint32(t) >>> 0;
				break
			}
		case 11:
			{
				r.shadowDy = readVarint32(t) >>> 0;
				break
			}
		case 12:
			{
				r.shadowRadius = readVarint32(t) >>> 0;
				break
			}
		case 13:
			{
				r.shadowColor = readString(t, readVarint32(t));
				break
			}
		case 14:
			{
				r.strokeColor = readString(t, readVarint32(t));
				break
			}
		case 15:
			{
				r.strokeWidth = readVarint32(t) >>> 0;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function decodeMemberMessage(t) {
	return _decodeMemberMessage(wrapByteBuffer(t))
}
function _decodeMemberMessage(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.common = _decodeCommon(t),
				t.limit = g;
				break
			}
		case 2:
			{
				let g = pushTemporaryLength(t);
				r.user = _decodeUser(t),
				t.limit = g;
				break
			}
		case 3:
			{
				r.memberCount = readVarint64(t, !0);
				break
			}
		case 4:
			{
				let g = pushTemporaryLength(t);
				r.operator = _decodeUser(t),
				t.limit = g;
				break
			}
		case 5:
			{
				r.isSetToAdmin = !!readByte(t);
				break
			}
		case 6:
			{
				r.isTopUser = !!readByte(t);
				break
			}
		case 7:
			{
				r.rankScore = readVarint64(t, !0);
				break
			}
		case 8:
			{
				r.topUserNo = readVarint64(t, !0);
				break
			}
		case 9:
			{
				r.enterType = readVarint64(t, !0);
				break
			}
		case 10:
			{
				r.action = readVarint64(t, !0);
				break
			}
		case 11:
			{
				r.actionDescription = readString(t, readVarint32(t));
				break
			}
		case 12:
			{
				r.userId = readVarint64(t, !0);
				break
			}
		case 13:
			{
				let g = pushTemporaryLength(t);
				r.effectConfig = _decodeEffectConfig(t),
				t.limit = g;
				break
			}
		case 14:
			{
				r.popStr = readString(t, readVarint32(t));
				break
			}
		case 15:
			{
				let g = pushTemporaryLength(t);
				r.enterEffectConfig = _decodeEffectConfig(t),
				t.limit = g;
				break
			}
		case 16:
			{
				let g = pushTemporaryLength(t);
				r.backgroundImage = _decodeImage(t),
				t.limit = g;
				break
			}
		case 17:
			{
				let g = pushTemporaryLength(t);
				r.backgroundImageV2 = _decodeImage(t),
				t.limit = g;
				break
			}
		case 18:
			{
				let g = pushTemporaryLength(t);
				r.anchorDisplayText = _decodeText(t),
				t.limit = g;
				break
			}
		case 19:
			{
				let g = pushTemporaryLength(t);
				r.publicAreaCommon = _decodePublicAreaCommon(t),
				t.limit = g;
				break
			}
		case 20:
			{
				r.userEnterTipType = readVarint64(t, !0);
				break
			}
		case 21:
			{
				r.anchorEnterTipType = readVarint64(t, !0);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodePublicAreaCommon(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.userLabel = _decodeImage(t),
				t.limit = g;
				break
			}
		case 2:
			{
				r.userConsumeInRoom = readVarint64(t, !0);
				break
			}
		case 3:
			{
				r.userSendGiftCntInRoom = readVarint64(t, !0);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeEffectConfig(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.type = readVarint64(t, !0);
				break
			}
		case 2:
			{
				let g = pushTemporaryLength(t);
				r.icon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 3:
			{
				r.avatarPos = readVarint64(t, !0);
				break
			}
		case 4:
			{
				let g = pushTemporaryLength(t);
				r.text = _decodeText(t),
				t.limit = g;
				break
			}
		case 5:
			{
				let g = pushTemporaryLength(t);
				r.textIcon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 6:
			{
				r.stayTime = readVarint32(t) >>> 0;
				break
			}
		case 7:
			{
				r.animAssetId = readVarint64(t, !0);
				break
			}
		case 8:
			{
				let g = pushTemporaryLength(t);
				r.badge = _decodeImage(t),
				t.limit = g;
				break
			}
		case 9:
			{
				let g = r.flexSettingArrayList || (r.flexSettingArrayList = []);
				if ((n & 7) === 2) {
					let y = pushTemporaryLength(t);
					for (; !isAtEnd(t); )
						g.push(readVarint64(t, !0));
					t.limit = y
				} else
					g.push(readVarint64(t, !0));
				break
			}
		case 10:
			{
				let g = pushTemporaryLength(t);
				r.textIconOverlay = _decodeImage(t),
				t.limit = g;
				break
			}
		case 11:
			{
				let g = pushTemporaryLength(t);
				r.animatedBadge = _decodeImage(t),
				t.limit = g;
				break
			}
		case 12:
			{
				r.hasSweepLight = !!readByte(t);
				break
			}
		case 13:
			{
				let g = r.textFlexSettingArrayList || (r.textFlexSettingArrayList = []);
				if ((n & 7) === 2) {
					let y = pushTemporaryLength(t);
					for (; !isAtEnd(t); )
						g.push(readVarint64(t, !0));
					t.limit = y
				} else
					g.push(readVarint64(t, !0));
				break
			}
		case 14:
			{
				r.centerAnimAssetId = readVarint64(t, !0);
				break
			}
		case 15:
			{
				let g = pushTemporaryLength(t);
				r.dynamicImage = _decodeImage(t),
				t.limit = g;
				break
			}
		case 16:
			{
				let g = r.extraMap || (r.extraMap = {}), y = pushTemporaryLength(t), $, L;
				t: for (; !isAtEnd(t); ) {
					let V = readVarint32(t);
					switch (V >>> 3) {
					case 0:
						break t;
					case 1:
						{
							$ = readString(t, readVarint32(t));
							break
						}
					case 2:
						{
							L = readString(t, readVarint32(t));
							break
						}
					default:
						skipUnknownField(t, V & 7)
					}
				}
				if ($ === void 0 || L === void 0)
					return console.log("Invalid data for map: extraMap");
				g[$] = L,
				t.limit = y;
				break
			}
		case 17:
			{
				r.mp4AnimAssetId = readVarint64(t, !0);
				break
			}
		case 18:
			{
				r.priority = readVarint64(t, !0);
				break
			}
		case 19:
			{
				r.maxWaitTime = readVarint64(t, !0);
				break
			}
		case 20:
			{
				r.dressId = readString(t, readVarint32(t));
				break
			}
		case 21:
			{
				r.alignment = readVarint64(t, !0);
				break
			}
		case 22:
			{
				r.alignmentOffset = readVarint64(t, !0);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeText(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.key = readString(t, readVarint32(t));
				break
			}
		case 2:
			{
				r.defaultPatter = readString(t, readVarint32(t));
				break
			}
		case 3:
			{
				let g = pushTemporaryLength(t);
				r.defaultFormat = _decodeTextFormat(t),
				t.limit = g;
				break
			}
		case 4:
			{
				let g = pushTemporaryLength(t);
				(r.piecesList || (r.piecesList = [])).push(_decodeTextPiece(t)),
				t.limit = g;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeTextPiece(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.type = !!readByte(t);
				break
			}
		case 2:
			{
				let g = pushTemporaryLength(t);
				r.format = _decodeTextFormat(t),
				t.limit = g;
				break
			}
		case 3:
			{
				r.stringValue = readString(t, readVarint32(t));
				break
			}
		case 4:
			{
				let g = pushTemporaryLength(t);
				r.userValue = _decodeTextPieceUser(t),
				t.limit = g;
				break
			}
		case 5:
			{
				let g = pushTemporaryLength(t);
				r.giftValue = _decodeTextPieceGift(t),
				t.limit = g;
				break
			}
		case 6:
			{
				let g = pushTemporaryLength(t);
				r.heartValue = _decodeTextPieceHeart(t),
				t.limit = g;
				break
			}
		case 7:
			{
				let g = pushTemporaryLength(t);
				r.patternRefValue = _decodeTextPiecePatternRef(t),
				t.limit = g;
				break
			}
		case 8:
			{
				let g = pushTemporaryLength(t);
				r.imageValue = _decodeTextPieceImage(t),
				t.limit = g;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeTextPieceImage(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.image = _decodeImage(t),
				t.limit = g;
				break
			}
		case 2:
			{
				r.scalingRate = readFloat(t);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeTextPiecePatternRef(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.key = readString(t, readVarint32(t));
				break
			}
		case 2:
			{
				r.defaultPattern = readString(t, readVarint32(t));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeTextPieceHeart(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.color = readString(t, readVarint32(t));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeTextPieceGift(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.giftId = readVarint64(t, !0);
				break
			}
		case 2:
			{
				let g = pushTemporaryLength(t);
				r.nameRef = _decodePatternRef(t),
				t.limit = g;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodePatternRef(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.key = readString(t, readVarint32(t));
				break
			}
		case 2:
			{
				r.defaultPattern = readString(t, readVarint32(t));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeTextPieceUser(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.user = _decodeUser(t),
				t.limit = g;
				break
			}
		case 2:
			{
				r.withColon = !!readByte(t);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeTextFormat(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.color = readString(t, readVarint32(t));
				break
			}
		case 2:
			{
				r.bold = !!readByte(t);
				break
			}
		case 3:
			{
				r.italic = !!readByte(t);
				break
			}
		case 4:
			{
				r.weight = readVarint32(t) >>> 0;
				break
			}
		case 5:
			{
				r.italicAngle = readVarint32(t) >>> 0;
				break
			}
		case 6:
			{
				r.fontSize = readVarint32(t) >>> 0;
				break
			}
		case 7:
			{
				r.useHeighLightColor = !!readByte(t);
				break
			}
		case 8:
			{
				r.useRemoteClor = !!readByte(t);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function decodeLikeMessage(t) {
	return _decodeLikeMessage(wrapByteBuffer(t))
}
function _decodeLikeMessage(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.common = _decodeCommon(t),
				t.limit = g;
				break
			}
		case 2:
			{
				r.count = readVarint64(t, !0);
				break
			}
		case 3:
			{
				r.total = readVarint64(t, !0);
				break
			}
		case 4:
			{
				r.color = readVarint64(t, !0);
				break
			}
		case 5:
			{
				let g = pushTemporaryLength(t);
				r.user = _decodeUser(t),
				t.limit = g;
				break
			}
		case 6:
			{
				r.icon = readString(t, readVarint32(t));
				break
			}
		case 7:
			{
				let g = pushTemporaryLength(t);
				r.doubleLikeDetail = _decodeDoubleLikeDetail(t),
				t.limit = g;
				break
			}
		case 8:
			{
				let g = pushTemporaryLength(t);
				r.displayControlInfo = _decodeDisplayControlInfo(t),
				t.limit = g;
				break
			}
		case 9:
			{
				r.linkmicGuestUid = readVarint64(t, !0);
				break
			}
		case 10:
			{
				r.scene = readString(t, readVarint32(t));
				break
			}
		case 11:
			{
				let g = pushTemporaryLength(t);
				r.picoDisplayInfo = _decodePicoDisplayInfo(t),
				t.limit = g;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function decodeSocialMessage(t) {
	return _decodeSocialMessage(wrapByteBuffer(t))
}
function _decodeSocialMessage(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.common = _decodeCommon(t),
				t.limit = g;
				break
			}
		case 2:
			{
				let g = pushTemporaryLength(t);
				r.user = _decodeUser(t),
				t.limit = g;
				break
			}
		case 3:
			{
				r.shareType = readVarint64(t, !0);
				break
			}
		case 4:
			{
				r.action = readVarint64(t, !0);
				break
			}
		case 5:
			{
				r.shareTarget = readString(t, readVarint32(t));
				break
			}
		case 6:
			{
				r.followCount = readVarint64(t, !0);
				break
			}
		case 7:
			{
				let g = pushTemporaryLength(t);
				r.publicAreaCommon = _decodePublicAreaCommon(t),
				t.limit = g;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodePicoDisplayInfo(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.comboSumCount = readVarint64(t, !0);
				break
			}
		case 2:
			{
				r.emoji = readString(t, readVarint32(t));
				break
			}
		case 3:
			{
				let g = pushTemporaryLength(t);
				r.emojiIcon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 4:
			{
				r.emojiText = readString(t, readVarint32(t));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeDoubleLikeDetail(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.doubleFlag = !!readByte(t);
				break
			}
		case 2:
			{
				r.seqId = readVarint32(t) >>> 0;
				break
			}
		case 3:
			{
				r.renewalsNum = readVarint32(t) >>> 0;
				break
			}
		case 4:
			{
				r.triggersNum = readVarint32(t) >>> 0;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeDisplayControlInfo(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.showText = !!readByte(t);
				break
			}
		case 2:
			{
				r.showIcons = !!readByte(t);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeCommon(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.method = readString(t, readVarint32(t));
				break
			}
		case 2:
			{
				r.msgId = readVarint64(t, !0);
				break
			}
		case 3:
			{
				r.roomId = readVarint64(t, !0);
				break
			}
		case 4:
			{
				r.createTime = readVarint64(t, !0);
				break
			}
		case 5:
			{
				r.monitor = readVarint32(t) >>> 0;
				break
			}
		case 6:
			{
				r.isShowMsg = !!readByte(t);
				break
			}
		case 7:
			{
				r.describe = readString(t, readVarint32(t));
				break
			}
		case 9:
			{
				r.foldType = readVarint64(t, !0);
				break
			}
		case 10:
			{
				r.anchorFoldType = readVarint64(t, !0);
				break
			}
		case 11:
			{
				r.priorityScore = readVarint64(t, !0);
				break
			}
		case 12:
			{
				r.logId = readString(t, readVarint32(t));
				break
			}
		case 13:
			{
				r.msgProcessFilterK = readString(t, readVarint32(t));
				break
			}
		case 14:
			{
				r.msgProcessFilterV = readString(t, readVarint32(t));
				break
			}
		case 15:
			{
				let g = pushTemporaryLength(t);
				r.user = _decodeUser(t),
				t.limit = g;
				break
			}
		case 17:
			{
				r.anchorFoldTypeV2 = readVarint64(t, !0);
				break
			}
		case 18:
			{
				r.processAtSeiTimeMs = readVarint64(t, !0);
				break
			}
		case 19:
			{
				r.randomDispatchMs = readVarint64(t, !0);
				break
			}
		case 20:
			{
				r.isDispatch = !!readByte(t);
				break
			}
		case 21:
			{
				r.channelId = readVarint64(t, !0);
				break
			}
		case 22:
			{
				r.diffSei2absSecond = readVarint64(t, !0);
				break
			}
		case 23:
			{
				r.anchorFoldDuration = readVarint64(t, !0);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeUser(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.id = readVarint64(t, !0);
				break
			}
		case 2:
			{
				r.shortId = readVarint64(t, !0);
				break
			}
		case 3:
			{
				r.nickName = readString(t, readVarint32(t));
				break
			}
		case 4:
			{
				r.gender = readVarint32(t) >>> 0;
				break
			}
		case 5:
			{
				r.Signature = readString(t, readVarint32(t));
				break
			}
		case 6:
			{
				r.Level = readVarint32(t) >>> 0;
				break
			}
		case 7:
			{
				r.Birthday = readVarint64(t, !0);
				break
			}
		case 8:
			{
				r.Telephone = readString(t, readVarint32(t));
				break
			}
		case 9:
			{
				let g = pushTemporaryLength(t);
				r.AvatarThumb = _decodeImage(t),
				t.limit = g;
				break
			}
		case 10:
			{
				let g = pushTemporaryLength(t);
				r.AvatarMedium = _decodeImage(t),
				t.limit = g;
				break
			}
		case 11:
			{
				let g = pushTemporaryLength(t);
				r.AvatarLarge = _decodeImage(t),
				t.limit = g;
				break
			}
		case 12:
			{
				r.Verified = !!readByte(t);
				break
			}
		case 13:
			{
				r.Experience = readVarint32(t) >>> 0;
				break
			}
		case 14:
			{
				r.city = readString(t, readVarint32(t));
				break
			}
		case 15:
			{
				r.Status = readVarint32(t);
				break
			}
		case 16:
			{
				r.CreateTime = readVarint64(t, !0);
				break
			}
		case 17:
			{
				r.ModifyTime = readVarint64(t, !0);
				break
			}
		case 18:
			{
				r.Secret = readVarint32(t) >>> 0;
				break
			}
		case 19:
			{
				r.ShareQrcodeUri = readString(t, readVarint32(t));
				break
			}
		case 20:
			{
				r.IncomeSharePercent = readVarint32(t) >>> 0;
				break
			}
		case 21:
			{
				let g = pushTemporaryLength(t);
				(r.BadgeImageList || (r.BadgeImageList = [])).push(_decodeImage(t)),
				t.limit = g;
				break
			}
		case 22:
			{
				let g = pushTemporaryLength(t);
				r.FollowInfo = _decodeFollowInfo(t),
				t.limit = g;
				break
			}
		case 23:
			{
				let g = pushTemporaryLength(t);
				r.PayGrade = _decodePayGrade(t),
				t.limit = g;
				break
			}
		case 24:
			{
				let g = pushTemporaryLength(t);
				r.FansClub = _decodeFansClub(t),
				t.limit = g;
				break
			}
		case 26:
			{
				r.SpecialId = readString(t, readVarint32(t));
				break
			}
		case 27:
			{
				let g = pushTemporaryLength(t);
				r.AvatarBorder = _decodeImage(t),
				t.limit = g;
				break
			}
		case 28:
			{
				let g = pushTemporaryLength(t);
				r.Medal = _decodeImage(t),
				t.limit = g;
				break
			}
		case 29:
			{
				let g = pushTemporaryLength(t);
				(r.RealTimeIconsList || (r.RealTimeIconsList = [])).push(_decodeImage(t)),
				t.limit = g;
				break
			}
		case 38:
			{
				r.displayId = readString(t, readVarint32(t));
				break
			}
		case 46:
			{
				r.secUid = readString(t, readVarint32(t));
				break
			}
		case 1022:
			{
				r.fanTicketCount = readVarint64(t, !0);
				break
			}
		case 1028:
			{
				r.idStr = readString(t, readVarint32(t));
				break
			}
		case 1045:
			{
				r.ageRange = readVarint32(t) >>> 0;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodePayGrade(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.totalDiamondCount = readVarint64(t, !1);
				break
			}
		case 2:
			{
				let g = pushTemporaryLength(t);
				r.diamondIcon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 3:
			{
				r.name = readString(t, readVarint32(t));
				break
			}
		case 4:
			{
				let g = pushTemporaryLength(t);
				r.icon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 5:
			{
				r.nextName = readString(t, readVarint32(t));
				break
			}
		case 6:
			{
				r.level = readVarint64(t, !1);
				break
			}
		case 7:
			{
				let g = pushTemporaryLength(t);
				r.nextIcon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 8:
			{
				r.nextDiamond = readVarint64(t, !1);
				break
			}
		case 9:
			{
				r.nowDiamond = readVarint64(t, !1);
				break
			}
		case 10:
			{
				r.thisGradeMinDiamond = readVarint64(t, !1);
				break
			}
		case 11:
			{
				r.thisGradeMaxDiamond = readVarint64(t, !1);
				break
			}
		case 12:
			{
				r.payDiamondBak = readVarint64(t, !1);
				break
			}
		case 13:
			{
				r.gradeDescribe = readString(t, readVarint32(t));
				break
			}
		case 14:
			{
				let g = pushTemporaryLength(t);
				(r.gradeIconList || (r.gradeIconList = [])).push(_decodeGradeIcon(t)),
				t.limit = g;
				break
			}
		case 15:
			{
				r.screenChatType = readVarint64(t, !1);
				break
			}
		case 16:
			{
				let g = pushTemporaryLength(t);
				r.imIcon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 17:
			{
				let g = pushTemporaryLength(t);
				r.imIconWithLevel = _decodeImage(t),
				t.limit = g;
				break
			}
		case 18:
			{
				let g = pushTemporaryLength(t);
				r.liveIcon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 19:
			{
				let g = pushTemporaryLength(t);
				r.newImIconWithLevel = _decodeImage(t),
				t.limit = g;
				break
			}
		case 20:
			{
				let g = pushTemporaryLength(t);
				r.newLiveIcon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 21:
			{
				r.upgradeNeedConsume = readVarint64(t, !1);
				break
			}
		case 22:
			{
				r.nextPrivileges = readString(t, readVarint32(t));
				break
			}
		case 23:
			{
				let g = pushTemporaryLength(t);
				r.background = _decodeImage(t),
				t.limit = g;
				break
			}
		case 24:
			{
				let g = pushTemporaryLength(t);
				r.backgroundBack = _decodeImage(t),
				t.limit = g;
				break
			}
		case 25:
			{
				r.score = readVarint64(t, !1);
				break
			}
		case 26:
			{
				let g = pushTemporaryLength(t);
				r.buffInfo = _decodeGradeBuffInfo(t),
				t.limit = g;
				break
			}
		case 1001:
			{
				r.gradeBanner = readString(t, readVarint32(t));
				break
			}
		case 1002:
			{
				let g = pushTemporaryLength(t);
				r.profileDialogBg = _decodeImage(t),
				t.limit = g;
				break
			}
		case 1003:
			{
				let g = pushTemporaryLength(t);
				r.profileDialogBgBack = _decodeImage(t),
				t.limit = g;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeFansClub(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.data = _decodeFansClubData(t),
				t.limit = g;
				break
			}
		case 2:
			{
				let g = r.preferData || (r.preferData = {}), y = pushTemporaryLength(t), $, L;
				t: for (; !isAtEnd(t); ) {
					let V = readVarint32(t);
					switch (V >>> 3) {
					case 0:
						break t;
					case 1:
						{
							$ = readVarint32(t);
							break
						}
					case 2:
						{
							let z = pushTemporaryLength(t);
							L = _decodeFansClubData(t),
							t.limit = z;
							break
						}
					default:
						skipUnknownField(t, V & 7)
					}
				}
				if ($ === void 0 || L === void 0)
					return console.log("Invalid data for map: preferData");
				g[$] = L,
				t.limit = y;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeFansClubData(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.clubName = readString(t, readVarint32(t));
				break
			}
		case 2:
			{
				r.level = readVarint32(t);
				break
			}
		case 3:
			{
				r.userFansClubStatus = readVarint32(t);
				break
			}
		case 4:
			{
				let g = pushTemporaryLength(t);
				r.badge = _decodeUserBadge(t),
				t.limit = g;
				break
			}
		case 5:
			{
				let g = r.availableGiftIds || (r.availableGiftIds = []);
				if ((n & 7) === 2) {
					let y = pushTemporaryLength(t);
					for (; !isAtEnd(t); )
						g.push(readVarint64(t, !1));
					t.limit = y
				} else
					g.push(readVarint64(t, !1));
				break
			}
		case 6:
			{
				r.anchorId = readVarint64(t, !1);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeUserBadge(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = r.icons || (r.icons = {}), y = pushTemporaryLength(t), $, L;
				t: for (; !isAtEnd(t); ) {
					let V = readVarint32(t);
					switch (V >>> 3) {
					case 0:
						break t;
					case 1:
						{
							$ = readVarint32(t);
							break
						}
					case 2:
						{
							let z = pushTemporaryLength(t);
							L = _decodeImage(t),
							t.limit = z;
							break
						}
					default:
						skipUnknownField(t, V & 7)
					}
				}
				if ($ === void 0 || L === void 0)
					return console.log("Invalid data for map: icons");
				g[$] = L,
				t.limit = y;
				break
			}
		case 2:
			{
				r.title = readString(t, readVarint32(t));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeGradeBuffInfo(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeGradeIcon(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.icon = _decodeImage(t),
				t.limit = g;
				break
			}
		case 2:
			{
				r.iconDiamond = readVarint64(t, !1);
				break
			}
		case 3:
			{
				r.level = readVarint64(t, !1);
				break
			}
		case 4:
			{
				r.levelStr = readString(t, readVarint32(t));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeFollowInfo(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.followingCount = readVarint64(t, !0);
				break
			}
		case 2:
			{
				r.followerCount = readVarint64(t, !0);
				break
			}
		case 3:
			{
				r.followStatus = readVarint64(t, !0);
				break
			}
		case 4:
			{
				r.pushStatus = readVarint64(t, !0);
				break
			}
		case 5:
			{
				r.remarkName = readString(t, readVarint32(t));
				break
			}
		case 6:
			{
				r.followerCountStr = readString(t, readVarint32(t));
				break
			}
		case 7:
			{
				r.followingCountStr = readString(t, readVarint32(t));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeImage(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				(r.urlListList || (r.urlListList = [])).push(readString(t, readVarint32(t)));
				break
			}
		case 2:
			{
				r.uri = readString(t, readVarint32(t));
				break
			}
		case 3:
			{
				r.height = readVarint64(t, !0);
				break
			}
		case 4:
			{
				r.width = readVarint64(t, !0);
				break
			}
		case 5:
			{
				r.avgColor = readString(t, readVarint32(t));
				break
			}
		case 6:
			{
				r.imageType = readVarint32(t) >>> 0;
				break
			}
		case 7:
			{
				r.openWebUrl = readString(t, readVarint32(t));
				break
			}
		case 8:
			{
				let g = pushTemporaryLength(t);
				r.content = _decodeImageContent(t),
				t.limit = g;
				break
			}
		case 9:
			{
				r.isAnimated = !!readByte(t);
				break
			}
		case 10:
			{
				let g = pushTemporaryLength(t);
				r.FlexSettingList = _decodeNinePatchSetting(t),
				t.limit = g;
				break
			}
		case 11:
			{
				let g = pushTemporaryLength(t);
				r.TextSettingList = _decodeNinePatchSetting(t),
				t.limit = g;
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeNinePatchSetting(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				(r.settingListList || (r.settingListList = [])).push(readString(t, readVarint32(t)));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _decodeImageContent(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.name = readString(t, readVarint32(t));
				break
			}
		case 2:
			{
				r.fontColor = readString(t, readVarint32(t));
				break
			}
		case 3:
			{
				r.level = readVarint64(t, !0);
				break
			}
		case 4:
			{
				r.alternativeText = readString(t, readVarint32(t));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function encodePushFrame(t) {
	let r = popByteBuffer();
	return _encodePushFrame(t, r),
	toUint8Array(r)
}
function _encodePushFrame(t, r) {
	let n = t.seqId;
	n !== void 0 && (writeVarint32(r, 8),
	writeVarint64(r, n));
	let g = t.logId;
	g !== void 0 && (writeVarint32(r, 16),
	writeVarint64(r, g));
	let y = t.service;
	y !== void 0 && (writeVarint32(r, 24),
	writeVarint64(r, y));
	let $ = t.method;
	$ !== void 0 && (writeVarint32(r, 32),
	writeVarint64(r, $));
	let L = t.headersList;
	if (L !== void 0)
		for (let re of L) {
			writeVarint32(r, 42);
			let ae = popByteBuffer();
			_encodeHeadersList(re, ae),
			writeVarint32(r, ae.limit),
			writeByteBuffer(r, ae),
			pushByteBuffer(ae)
		}
	let V = t.payloadEncoding;
	V !== void 0 && (writeVarint32(r, 50),
	writeString(r, V));
	let z = t.payloadType;
	z !== void 0 && (writeVarint32(r, 58),
	writeString(r, z));
	let j = t.payload;
	j !== void 0 && (writeVarint32(r, 66),
	writeVarint32(r, j.length),
	writeBytes(r, j))
}
function decodePushFrame(t) {
	return _decodePushFrame(wrapByteBuffer(t))
}
function _decodePushFrame(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.seqId = readVarint64(t, !0);
				break
			}
		case 2:
			{
				r.logId = readVarint64(t, !0);
				break
			}
		case 3:
			{
				r.service = readVarint64(t, !0);
				break
			}
		case 4:
			{
				r.method = readVarint64(t, !0);
				break
			}
		case 5:
			{
				let g = pushTemporaryLength(t);
				(r.headersList || (r.headersList = [])).push(_decodeHeadersList(t)),
				t.limit = g;
				break
			}
		case 6:
			{
				r.payloadEncoding = readString(t, readVarint32(t));
				break
			}
		case 7:
			{
				r.payloadType = readString(t, readVarint32(t));
				break
			}
		case 8:
			{
				r.payload = readBytes(t, readVarint32(t));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function _encodeHeadersList(t, r) {
	let n = t.key;
	n !== void 0 && (writeVarint32(r, 10),
	writeString(r, n));
	let g = t.value;
	g !== void 0 && (writeVarint32(r, 18),
	writeString(r, g))
}
function _decodeHeadersList(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				r.key = readString(t, readVarint32(t));
				break
			}
		case 2:
			{
				r.value = readString(t, readVarint32(t));
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function decodeControlMessage(t) {
	return _decodeControlMessage(wrapByteBuffer(t))
}
function _decodeControlMessage(t) {
	let r = {};
	e: for (; !isAtEnd(t); ) {
		let n = readVarint32(t);
		switch (n >>> 3) {
		case 0:
			break e;
		case 1:
			{
				let g = pushTemporaryLength(t);
				r.common = _decodeCommon(t),
				t.limit = g;
				break
			}
		case 2:
			{
				r.status = readVarint32(t);
				break
			}
		default:
			skipUnknownField(t, n & 7)
		}
	}
	return r
}
function pushTemporaryLength(t) {
	let r = readVarint32(t)
	  , n = t.limit;
	return t.limit = t.offset + r,
	n
}
function skipUnknownField(t, r) {
	switch (r) {
	case 0:
		for (; readByte(t) & 128; )
			;
		break;
	case 2:
		skip(t, readVarint32(t));
		break;
	case 5:
		skip(t, 4);
		break;
	case 1:
		skip(t, 8);
		break;
	default:
		console.log("Unimplemented type: " + r)
	}
}
let f32 = new Float32Array(1)
  , f32_u8 = new Uint8Array(f32.buffer)
  , f64 = new Float64Array(1);
new Uint8Array(f64.buffer);
let bbStack = [];
function popByteBuffer() {
	const t = bbStack.pop();
	return t ? (t.offset = t.limit = 0,
	t) : {
		bytes: new Uint8Array(64),
		offset: 0,
		limit: 0
	}
}
function pushByteBuffer(t) {
	bbStack.push(t)
}
function wrapByteBuffer(t) {
	return {
		bytes: t,
		offset: 0,
		limit: t.length
	}
}
function toUint8Array(t) {
	let r = t.bytes
	  , n = t.limit;
	return r.length === n ? r : r.subarray(0, n)
}
function skip(t, r) {
	if (t.offset + r > t.limit)
		return console.log("Skip past limit");
	t.offset += r
}
function isAtEnd(t) {
	return t.offset >= t.limit
}
function grow(t, r) {
	let n = t.bytes
	  , g = t.offset
	  , y = t.limit
	  , $ = g + r;
	if ($ > n.length) {
		let L = new Uint8Array($ * 2);
		L.set(n),
		t.bytes = L
	}
	return t.offset = $,
	$ > y && (t.limit = $),
	g
}
function advance(t, r) {
	let n = t.offset;
	if (n + r > t.limit) console.log("Read past limit");
	return t.offset += r,
	n
}
function readBytes(t, r) {
	let n = advance(t, r);
	return t.bytes.subarray(n, n + r)
}
function writeBytes(t, r) {
	let n = grow(t, r.length);
	t.bytes.set(r, n)
}
function readString(t, r) {
	let n = advance(t, r)
	  , g = String.fromCharCode
	  , y = t.bytes
	  , $ = "�"
	  , L = "";
	for (let V = 0; V < r; V++) {
		let z = y[V + n], j, re, ae, oe;
		z & 128 ? (z & 224) === 192 ? V + 1 >= r ? L += $ : (j = y[V + n + 1],
		(j & 192) !== 128 ? L += $ : (oe = (z & 31) << 6 | j & 63,
		oe < 128 ? L += $ : (L += g(oe),
		V++))) : (z & 240) == 224 ? V + 2 >= r ? L += $ : (j = y[V + n + 1],
		re = y[V + n + 2],
		((j | re << 8) & 49344) !== 32896 ? L += $ : (oe = (z & 15) << 12 | (j & 63) << 6 | re & 63,
		oe < 2048 || oe >= 55296 && oe <= 57343 ? L += $ : (L += g(oe),
		V += 2))) : (z & 248) == 240 ? V + 3 >= r ? L += $ : (j = y[V + n + 1],
		re = y[V + n + 2],
		ae = y[V + n + 3],
		((j | re << 8 | ae << 16) & 12632256) !== 8421504 ? L += $ : (oe = (z & 7) << 18 | (j & 63) << 12 | (re & 63) << 6 | ae & 63,
		oe < 65536 || oe > 1114111 ? L += $ : (oe -= 65536,
		L += g((oe >> 10) + 55296, (oe & 1023) + 56320),
		V += 3))) : L += $ : L += g(z)
	}
	return L
}
function writeString(t, r) {
	let n = r.length
	  , g = 0;
	for (let L = 0; L < n; L++) {
		let V = r.charCodeAt(L);
		V >= 55296 && V <= 56319 && L + 1 < n && (V = (V << 10) + r.charCodeAt(++L) - 56613888),
		g += V < 128 ? 1 : V < 2048 ? 2 : V < 65536 ? 3 : 4
	}
	writeVarint32(t, g);
	let y = grow(t, g)
	  , $ = t.bytes;
	for (let L = 0; L < n; L++) {
		let V = r.charCodeAt(L);
		V >= 55296 && V <= 56319 && L + 1 < n && (V = (V << 10) + r.charCodeAt(++L) - 56613888),
		V < 128 ? $[y++] = V : (V < 2048 ? $[y++] = V >> 6 & 31 | 192 : (V < 65536 ? $[y++] = V >> 12 & 15 | 224 : ($[y++] = V >> 18 & 7 | 240,
		$[y++] = V >> 12 & 63 | 128),
		$[y++] = V >> 6 & 63 | 128),
		$[y++] = V & 63 | 128)
	}
}
function writeByteBuffer(t, r) {
	let n = grow(t, r.limit)
	  , g = t.bytes
	  , y = r.bytes;
	for (let $ = 0, L = r.limit; $ < L; $++)
		g[$ + n] = y[$]
}
function readByte(t) {
	return t.bytes[advance(t, 1)]
}
function writeByte(t, r) {
	let n = grow(t, 1);
	t.bytes[n] = r
}
function readFloat(t) {
	let r = advance(t, 4)
	  , n = t.bytes;
	return f32_u8[0] = n[r++],
	f32_u8[1] = n[r++],
	f32_u8[2] = n[r++],
	f32_u8[3] = n[r++],
	f32[0]
}
function readVarint32(t) {
	let r = 0, n = 0, g;
	do
		g = readByte(t),
		r < 32 && (n |= (g & 127) << r),
		r += 7;
	while (g & 128);
	return n
}
function writeVarint32(t, r) {
	for (r >>>= 0; r >= 128; )
		writeByte(t, r & 127 | 128),
		r >>>= 7;
	writeByte(t, r)
}
function readVarint64(t, r) {
	let n = 0, g = 0, y = 0, $;
	return $ = readByte(t),
	n = $ & 127,
	$ & 128 && ($ = readByte(t),
	n |= ($ & 127) << 7,
	$ & 128 && ($ = readByte(t),
	n |= ($ & 127) << 14,
	$ & 128 && ($ = readByte(t),
	n |= ($ & 127) << 21,
	$ & 128 && ($ = readByte(t),
	g = $ & 127,
	$ & 128 && ($ = readByte(t),
	g |= ($ & 127) << 7,
	$ & 128 && ($ = readByte(t),
	g |= ($ & 127) << 14,
	$ & 128 && ($ = readByte(t),
	g |= ($ & 127) << 21,
	$ & 128 && ($ = readByte(t),
	y = $ & 127,
	$ & 128 && ($ = readByte(t),
	y |= ($ & 127) << 7))))))))),
	{
		low: n | g << 28,
		high: g >>> 4 | y << 24,
		unsigned: r
	}
}
function writeVarint64(t, r) {
	let n = r.low >>> 0
	  , g = (r.low >>> 28 | r.high << 4) >>> 0
	  , y = r.high >>> 24
	  , $ = y === 0 ? g === 0 ? n < 16384 ? n < 128 ? 1 : 2 : n < 1 << 21 ? 3 : 4 : g < 16384 ? g < 128 ? 5 : 6 : g < 1 << 21 ? 7 : 8 : y < 128 ? 9 : 10
	  , L = grow(t, $)
	  , V = t.bytes;
	switch ($) {
	case 10:
		V[L + 9] = y >>> 7 & 1;
	case 9:
		V[L + 8] = $ !== 9 ? y | 128 : y & 127;
	case 8:
		V[L + 7] = $ !== 8 ? g >>> 21 | 128 : g >>> 21 & 127;
	case 7:
		V[L + 6] = $ !== 7 ? g >>> 14 | 128 : g >>> 14 & 127;
	case 6:
		V[L + 5] = $ !== 6 ? g >>> 7 | 128 : g >>> 7 & 127;
	case 5:
		V[L + 4] = $ !== 5 ? g | 128 : g & 127;
	case 4:
		V[L + 3] = $ !== 4 ? n >>> 21 | 128 : n >>> 21 & 127;
	case 3:
		V[L + 2] = $ !== 3 ? n >>> 14 | 128 : n >>> 14 & 127;
	case 2:
		V[L + 1] = $ !== 2 ? n >>> 7 | 128 : n >>> 7 & 127;
	case 1:
		V[L] = $ !== 1 ? n | 128 : n & 127
	}
}